<%--
    Document   : temp
    Created on : Oct 4, 2012, 4:10:02 PM
    Author     : MinhThang
--%>

<%@page import="org.apt.connectDB.MyConnect"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>National Level Paper Presentation</title>
        <link href="style/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="style/css/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="style/css/ie7.css" /><![endif]-->

<!-- JavaScripts-->
<script type="text/javascript" src="style/js/jquery.js"></script>
<script type="text/javascript" src="style/js/jNice.js"></script>
    </head>
    <body>
        <%
                           if(session.getAttribute("AdminUser")==null || session.getAttribute("AdminUser").toString()==""){
                                response.sendRedirect("/Admin/adminlogin.jsp");
                           }
                        %>
        <div id="wrapper">
            <h1><a href="#"><span>Admin Paper Presentation</span></a></h1>
            <div><%@include file="Template/header.jsp" %></div>
            <div id="containerHolder">
                      <div id="sidebar">
                	<ul class="sideNav">
                            <li class="limenu"><a href="list_payment_lecture.jsp"  >Payment lecture event</a></li>
                            <li class="limenu" ><a href="list_payment_seminar.jsp">Payment seminar</a></li>
                            <li class="limenu" ><a href="list_lecture_active.jsp">Paided payment lecture</a></li>
                            <li  class="active"><a href="list_Seminar_active.jsp">Paided payment seminar</a></li>
                        </ul>
                    <!-- // .sideNav -->
                        </div>
                    <h2><a href="#">Payment >></a> <a href="#" class="active">Payment seminar</a></h2>
                <div id="main">
                    <form action="" class="jNice">
			<table>
                            <tr>
                                <td><h3>Seminar name </h3></td>
                                <td><h3>Customer name </h3></td>
                                <td><h3>Member </h3></td>
                                <td></td>
                            </tr>
                            <%
                            //display data
                            Connection conn=null;
                            PreparedStatement ps=null;
                            ResultSet rs=null;
                            String sql="SELECT  PaymentSeminarAdmin.ID, PaymentSeminarAdmin.PaymentSeminarID, PaymentSeminarAdmin.AdminID, PaymentSeminar.[User], Seminar.SeminarName, ";
                                 sql+="Member.FullName, PaymentSeminar.StatusPayment ";
                                 sql+="FROM PaymentSeminarAdmin INNER JOIN ";
                                 sql+="PaymentSeminar ON PaymentSeminarAdmin.PaymentSeminarID = PaymentSeminar.ID INNER JOIN ";
                                 sql+="Seminar ON PaymentSeminar.SeminarID = Seminar.SeminarID INNER JOIN ";
                                 sql+="Member ON PaymentSeminar.[User] = Member.UserName ";
                                 sql+="WHERE (PaymentSeminar.StatusPayment = ?) ";
                                try{
                                conn=MyConnect.getConnection();
                                ps=conn.prepareCall(sql);
                                ps.setBoolean(1, true);
                                rs=ps.executeQuery();
                                while(rs.next()){%>
                                        <tr>
                                            <td><b><%=rs.getString("SeminarName").toString()%></b></td>
                                            <td><b><%=rs.getString("FullName").toString()%></b></td>
                                            <td><b><%=rs.getString("User").toString()%></b></td>
                                            <td><a href="payment_seminar_active_detail.jsp?ID=<%=rs.getString("PaymentSeminarID").toString()%>" class="active">Detail</a></td>
                                        </tr>
                                   <%
                                   }
                                   conn.close();
                                }
                            catch(Exception e){
                                e.printStackTrace();
                                }
                            %>
                        </table>
                    </form>
                </div>
                <!-- // #main -->
                <div class="clear"></div>
                </div>
            </div>
    </body>
</html>
